package com.ep.modules.app.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ep.common.utils.PageUtils;
import com.ep.modules.app.dao.AppProjectQualityIssueMapper;
import com.ep.modules.app.entity.AppProjectQualityIssue;
import com.ep.modules.app.entity.AppProjectQualityIssueExample;
import com.ep.modules.app.service.AppProjectQualityIssueService;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AppProjectQualityIssueServiceImpl implements AppProjectQualityIssueService {
    @Autowired
    private AppProjectQualityIssueMapper appProjectQualityIssueMapper;

    public PageUtils queryPage(Map<String, Object> params) {
        String searchKey = (String)params.get("searchKey");
        Long searchUserId = (Long)params.get("searchUserId");
        AppProjectQualityIssueExample example = new AppProjectQualityIssueExample();
        AppProjectQualityIssueExample.Criteria criteria = example.createCriteria();
        List<AppProjectQualityIssue> list = appProjectQualityIssueMapper.selectByExample(example);
        Page<AppProjectQualityIssue> page = new Page<>();
        page.setRecords(list);
        return new PageUtils(page);
    }

    public AppProjectQualityIssue getById(Long id) {
        return appProjectQualityIssueMapper.selectByPrimaryKey(id.intValue());
    }

    public void save(AppProjectQualityIssue entity) {

        ////appProjectQualityIssueMapper.insert(entity);
    }

    public void update(AppProjectQualityIssue entity) {
        /////appProjectQualityIssueMapper.updateByPrimaryKeySelective(entity);
    }

    public void deleteBatch(Long[] ids) {
        for (Long id : ids) {
                appProjectQualityIssueMapper.deleteByPrimaryKey(id.intValue());
        }
    }
}